package com.dtb.trade.dao.mongodb.fourth;

import com.dtb.trade.entity.mongodb.fourth.FourthBlock;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * @Author:ChengJian
 * @Description:
 * @Date: Created in 上午10:13 2018/8/16
 */
public interface FourthRepository extends MongoRepository<FourthBlock,String> {

    FourthBlock findBlockByIndex(long index);

    @Query("{'index':{'$gte':?0}}")
    List<FourthBlock> findFourthBlockByIndex(int index);
}
